/**
 * Created by xnr on 2020-03-31.
 */
import request from '../utils/fetch'
//获取当前登录用户信息
export function customerinfo (data) {
  return request({
    url: '/admin/customer/info',
    method: 'get',
    requestBody: 'null',
    loading: true,
    params: data
  })
}
export function xiaoxishuliang (data) {
  return request({
    url: '/admin/message/getMessageCount',
    method: 'get',
    requestBody: 'null',
    loading: true,
    params: data
  })
}

export function getCustomerInfo (data) {
  return request({
    url: '/admin/customer/getCustomerInfo',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}
export function getcustomerinfo (data) {
  return request({
    url: '/admin/customer/getInfo',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
//修改昵称
export function updateNickName (data) {
  return request({
    url: '/admin/customer/updateInfo',
    method: 'post',
    requestBody: 'body',
    loading: true,
    data: data
  })
}
export function updateAdminCustomerFace (data) {
  return request({
    url: '/admin/customer/updateAdminCustomerFace',
    method: 'get',
    requestBody: 'null',
    loading: true,
    params: data
  })
}

export function updatePassword (data) {
  return request({
    url: '/admin/customer/updatePassword',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}
//用户名密码登录
export function customerlogin (data) {
  return request({
    url: '/admin/customer/login',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}
//用户名密码注册
export function customerregister (data) {
  return request({
    url: '/admin/customer/register',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}
//用户操作退出登录
export function customerlogout (data) {
  return request({
    url: '/admin/customer/logout',
    method: 'post',
    requestBody: 'null',
    loading: true,
    data: data
  })
}

//新增系统用户
export function customeradd (data) {
  return request({
    url: '/admin/customer/add',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}
//修改系统用户角色
export function customerupdate (data) {
  return request({
    url: '/admin/customer/update',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}
//获取管理用户列表
export function customermanagerList (data) {
  return request({
    url: '/admin/customer/managerList',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
//修改指定用户状态
export function customerupdateStatus (data) {
  return request({
    url: '/admin/customer/updateStatus',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}
export function getadmininfo (data) {
  return request({
    url: '/admin/customer/testinfo',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
//修改登录密码
export function xiugaimima (data) {
  return request({
    url: '/admin/customer/updatePwdByOldPwd',
    method: 'post',
    requestBody: 'query',
    loading: true,
    data: data
  })
}